enum FilterType {
  all(title: '全部', id: 1, field: 'all', sort: -1),
  salecount(title: '销量', id: 2, field: 'salecount', sort: -1),
  price(title: '价格', id: 3, field: 'price', sort: -1),
  filter(title: '筛选', id: 4, field: "filter", sort: 0);

  final String title;
  final int id;
  final String? field;
  final int sort;

  const FilterType({
    required this.title,
    required this.id,
    this.field,
    required this.sort,
  });

  static List<FilterType> get value => [
        FilterType.all,
        FilterType.salecount,
        FilterType.price,
        FilterType.filter,
      ];
}